package com.md.album.impl;

import android.content.Context;

import androidx.fragment.app.Fragment;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.md.album.interfaces.FragmentServiceListner;
import com.md.basedpc.routerservice.FragmentService;

/**
 * @author liyue
 * created 2021/3/20
 * desc 向主页面中添加Fragment，暂时还没有用到，后续可能会用。
 */
@Route(path = "/app/addfragment")
public class FragmentServiceImpl implements FragmentService {

    private FragmentServiceListner listner;

//   public FragmentServiceImpl(FragmentServiceListner listner){
//        this.listner = listner;
//    }
    public void setListner(FragmentServiceListner listner){
        this.listner=listner;
    }
    @Override
    public void addFragment(Fragment fragment) {
        if(listner !=null) listner.addFragment(fragment);
    }


    @Override
    public void init(Context context) {

    }
}
